home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0867.dms / q0867.adf / TRAPDOOR.LZH / Rexx / tdcost.rexx next >
OS/2 REXX Batch file  |  1991-09-27  |  365b  |  24 lines

  1. /* tdcost.rexx
  2.  
  3.    Usage: rx tdcost.rexx
  4.  
  5.    Summarizes the cost from the output of the listacct utility. Reads input
  6.    from stdin.
  7. */
  8.  
  9. total = 0
  10. in=stdin
  11.  
  12. do while ~eof(in)
  13.     line=readln(in)
  14.     node = word(line,1)
  15.     cost = word(line,3)
  16.     if pos(":",node)~=0 then do
  17. /*    say "Node" node ":" cost    */
  18.         cost = cost + 0
  19.         total = total + cost
  20.     end
  21. end
  22.  
  23. say date()":" total
  24.